import request from '@/utils/request'

// 查询应急救援物资清单列表
export function listMaterials(query) {
  return request({
    url: '/ledger/materials/list',
    method: 'get',
    params: query
  })
}

// 查询应急救援物资清单详细
export function getMaterials(id) {
  return request({
    url: '/ledger/materials/' + id,
    method: 'get'
  })
}

// 新增应急救援物资清单
export function addMaterials(data) {
  return request({
    url: '/ledger/materials',
    method: 'post',
    data: data
  })
}

// 修改应急救援物资清单
export function updateMaterials(data) {
  return request({
    url: '/ledger/materials',
    method: 'put',
    data: data
  })
}

// 删除应急救援物资清单
export function delMaterials(id) {
  return request({
    url: '/ledger/materials/' + id,
    method: 'delete'
  })
}
export function exportMaterials(query) {
  return request({
    url: '/ledger/materials/export',
    method: 'get',
    params: query
  })
}
